package me.zhengjie.sqlservilce.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.mapper.NestingMiddleTableMapper;
import me.zhengjie.pojo.entity.NestingMiddleTable;
import me.zhengjie.sqlservilce.NestingMiddleTableService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class NestingMiddleTableServiceImpl extends ServiceImpl<NestingMiddleTableMapper, NestingMiddleTable> implements NestingMiddleTableService {
    private final NestingMiddleTableMapper nestingMiddleTableMapper;

    @Override
    public List<NestingMiddleTable> selectContainerCode(String containerCode) {
        LambdaQueryWrapper<NestingMiddleTable> middleTableLambdaQueryWrapper = new LambdaQueryWrapper<>();
        middleTableLambdaQueryWrapper.eq(NestingMiddleTable::getContainerCode,containerCode);
        return nestingMiddleTableMapper.selectList(middleTableLambdaQueryWrapper);
    }
}
